﻿using Newtonsoft.Json;
using Newtonsoft.Json.Linq;

namespace FastCodeGeneration.Core.Utility
{
    public class JsonUtility
    {
        public static string[]? GetArray(string json)
        {
            if (json.IsBlank())
            {
                return null;
            }
            return JsonConvert.DeserializeObject<JToken[]>(json).Select(e => e.ToString()).ToArray();
        }

    }
}
